package com.yupi.yu_picture.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yupi.yu_picture.model.dto.user.UserAddRequest;
import com.yupi.yu_picture.model.dto.user.UserQueryRequest;
import com.yupi.yu_picture.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yupi.yu_picture.model.vo.LoginUserVO;
import com.yupi.yu_picture.model.vo.UserVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author 41722
* @description 针对表【user(用户)】的数据库操作Service
* @createDate 2025-03-21 20:12:50
*/
public interface UserService extends IService<User> {
    //用户注册：
    Long UserRegister(String userAccount, String userPassword, String checkPassword);

    //给密码加密
    String getEncryptPassword(String userPassword);

    LoginUserVO UserLogin(String userAccount, String userPassword, HttpServletRequest request);

    User getLoginUser(HttpServletRequest request);

    //将用户信息脱敏并返回；
    LoginUserVO getLoginUserVo(User user);

    boolean userLogout(HttpServletRequest request);

    UserVO getUserVo(User user);

    List<UserVO> getListUserVo(List<User> userList);

    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    boolean isAdmin(User user);
}
